package cn.tedu._01mvcbooto1.controller;

import cn.tedu._01mvcbooto1.pojo.dto.AddCartDTO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class CarController {
    @RequestMapping("/v1/car/add")
    @ResponseBody
    public String add(String brand,String license,Double price){
        System.out.println("车辆信息："+brand+"--车牌:"+license+"--价格:"+price);
        return "购车成功";
    }

    @RequestMapping("/v1/car/add2")
    @ResponseBody
    public String add2(AddCartDTO addCartDTO){
        System.out.println("addCartDTO = " + addCartDTO);
        return "添加车辆成功";
    }
}
